package br.com.fiap.beans;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

import javax.enterprise.context.RequestScoped;
import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;
import javax.inject.Inject;
import javax.inject.Named;

import org.apache.commons.beanutils.BeanUtils;

import br.com.fiap.dao.ClienteDAO;
import br.com.fiap.dao.LoginDAO;
import br.com.fiap.entity.Cliente;
import br.com.fiap.entity.Login;
import br.com.fiap.enumeration.TipoUsuario;

@Named
@ManagedBean
@SessionScoped
public class MenuBean extends AbstractBeanAcessor implements Serializable {

	private static final long serialVersionUID = 2156716669934292152L;
	
	boolean cliente;
	boolean voo;
	boolean trecho;
	boolean compra;
	boolean reserva;
	
	public boolean isCliente() {
		return cliente;
	}
	public void setCliente(boolean cliente) {
		this.cliente = cliente;
	}
	public boolean isVoo() {
		return voo;
	}
	public void setVoo(boolean voo) {
		this.voo = voo;
	}
	public boolean isTrecho() {
		return trecho;
	}
	public void setTrecho(boolean trecho) {
		this.trecho = trecho;
	}
	public boolean isCompra() {
		return compra;
	}
	public void setCompra(boolean compra) {
		this.compra = compra;
	}
	public boolean isReserva() {
		return reserva;
	}
	public void setReserva(boolean reserva) {
		this.reserva = reserva;
	}
	
	public String logOff() {
		
		getSession().removeAttribute("menuBean");
		getSession().removeAttribute("usuarioLogado");
		getSession().removeAttribute("auth");
		
		return "/cliente/login";
}
}
